RMI Interview Questions and Answers
Ques 21. What is object serialization in RMI?
To marshal and unmarshall the parameters involves the object serialization and does not truncate types.
The methods of local object and their bytecodes are not passed directly in the ObjectOutputStream. At times the name of the class of the objects may be needed that is to be loaded by the receiver if at all the class is not available locally. Just like the names of the classes, the class files themselves will not be serialized. All classes must load during the process of deserialization using the normal mechanisms of class loading.
Ques 22. What is RMI callback mechanism?
When one service passes an object which is the proxy for another service, the RMI callback mechanism occurs. The methods will be invoked by the recipient in the object it received and be calling back to the calling point. The stub contains the information that is needed to call back to server at the time of the need.
Ques 23. What is the role of Remote Interface in RMI?
Remote interfaces are defined by extending ,an interface called Remote provided in the java.rmi package. The methods must throw RemoteException. But application specific exceptions may also be thrown.
Ques 24. Explain marshalling and demarshalling.
During communication between two machines through RPC or RMI, parameters are packed into a message and then sent over the network. This packing of parameters into a message is called marshalling.
On the other side these packed parameters are unpacked from the message which is called unmarshalling.
Ques 25. What is a skeleton in RMI?
Server side stub is refered to as a skeleton.
Most helpful rated by users:
- What is RMI?
- What are the services in RMI ?
- Explain RMI Architecture?
- What is the difference between RMI & Corba?
- Does RMI-IIOP support dynamic downloading of classes?